<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
          
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
        <link rel="stylesheet" href="/begin/public/css/cssFormulario.css"/>
    </h:head>
    <h:body>
        <section class="contenedorLogin">
            <h:form class="formulario">
                <h2>Acceso de Usuario</h2>
                <p>Rellene el siguiente formulario para ingresar al sistema</p>
                <p><h:inputText pt:placeholder="Usuario" value="#{mbLogin.usuario}" /></p>
                <p><h:inputSecret pt:placeholder="Contraseña" value="#{mbLogin.contrasenia}" /></p>
                <h:messages infoStyle="color: blue;list-style:none;" errorStyle="color:red;list-style:none;"/>
                <section class="seccionBotones">
                    <p:commandButton value="Registrarse" type="button" onclick="PF('dlg2').show();" />
                    <h:commandButton value="Ingresar" action="#{mbLogin.login()}"  />
                </section>             
                </h:form>
            </section>
                <p:dialog header="Registro de acceso" widgetVar="dlg2" modal="true" height="250">
                <h:form>    
                <h:panelGrid id="grid" columns="2" cellpadding="2" >   
                  
                <h:outputLabel  for="name" value="Usuario:" style="font-weight:bold" />
                <p:inputText id="name" required="true" maxlength="30"/>
                
                <h:outputLabel for="clave" value="Contraseña:" style="font-weight:bold" />
                <p:password id="clave1" value="#{passwordView.password4}" feedback="true" inline="true" required="true" maxlength="20"  />
                
                <h:outputLabel for="clave1" value="Repita Contraseña:" style="font-weight:bold" />
                <p:password id="clave2" value="#{passwordView.password4}" feedback="true" inline="true" required="true"  maxlength="20"  />
                
                <h:outputLabel for="email" value="Correo electronico:" style="font-weight:bold" />
                <p:autoComplete id="email" value="#{autoCompleteView.txt1}" completeMethod="#{autoCompleteView.completeText}" placeholder="alguien@example.com" required="true" maxlength="30" />  
                
                <h:outputLabel for="email1" value="Correo electronico alterno:" style="font-weight:bold" />
                <p:autoComplete id="email1" value="#{autoCompleteView.txt1}" completeMethod="#{autoCompleteView.completeText}" placeholder="alguien@example.com" required="true" maxlength="30" /> 
               
                <h:panelGroup></h:panelGroup>
                <p:commandButton value="Registrar" id="withIcon" actionListener="#{buttonView.buttonAction}" icon="ui-icon-disk" />
                
                </h:panelGrid>
                </h:form>         
                </p:dialog>             
   
    </h:body>
</html>